﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="IndexImgEdit.aspx.cs" Inherits="StudentManage.Web.Admin.Management.indexImg.IndexImgEdit" %>

<%@ Register src="/Admin/PageHead/UC_Head.ascx" tagname="UC_Head" tagprefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <uc1:UC_Head ID="UC_Head1" runat="server" />
    <style type="text/css">
        body
        {
            margin: 0px;
            background-color: #F8F9FA;
        }
        .Edit_Main{ font-size:12px;}
        .Edit_Main td{ padding:5px 0px;}
    </style>
<%--    <script src="/js/jquery-1.8.3.min.js" type="text/javascript"></script>
    <link href="/Admin/images/skin.css" rel="stylesheet" type="text/css" />--%>
    <script type="text/javascript">
        function SaveImgV() {
            var b = true;
            if ($("#txt_title").val() == "") {
                alert("请输入图片名称!");
                b = false;
            }

            if ($("#HidImgPath").val() == "") {
                alert("请选择图片!");
                b = false;
            }
//            if ($("#file_ImgPath").val() == "") {
//                alert("请选择图片!");
//                b = false;
//            }
//            else {
//                var strName = $("#file_ImgPath").val().toString().split('.');
//                var mex = strName[strName.length - 1];
//                if (mex != 'jpg' && mex != 'gif' && mex != 'png') {
//                    alert("请选择正确的图片格式");
//                    b = false;
//                }
//            }
            return b;
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <asp:HiddenField ID="HidImgPath" runat="server" Value="" />
    <table width="100%" border="0" cellpadding="0" cellspacing="0" node-type="header_table">
        <tr>
            <td width="17" height="29" valign="top" background="../../images/mail_leftbg.gif">
                <img src="../../images/left-top-right.gif" width="17" height="29" />
            </td>
            <td height="29" valign="top" background="../images/content-bg.gif">
                <table width="100%" height="31" border="0" cellpadding="0" cellspacing="0" class="left_topbg"
                    id="table2">
                    <tr>
                        <td height="31">
                            <div class="titlebt">图片详细</div>
                        </td>
                    </tr>
                </table>
            </td>
            <td width="16" valign="top" background="../../images/mail_rightbg.gif">
                <img src="../../images/nav-right-bg.gif" width="16" height="29" />
            </td>
        </tr>
        <tr>
            <td height="71" valign="middle" background="../../images/mail_leftbg.gif">
                &nbsp;
            </td>
            <td valign="top" bgcolor="#F7F8F9">
                <table width="100%" height="138" border="0" cellpadding="0" cellspacing="0" node-type="header_table">
                    <tr>
                        <td height="13" valign="top">
                            &nbsp;
                        </td>
                    </tr>
                    <tr>
                        <td valign="top">
                            <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
                                <tr>
                                    <td class="left_txt">
                                        当前位置：图片详细
                                    </td>
                                </tr>
                                <tr>
                                    <td height="20">
                                        <table width="100%" height="1" border="0" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">
                                            <tr><td></td></tr>
                                        </table>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="Edit_Main">
                                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                            <tr>
                                                <td align="right" style="width:80px;">图片标题：</td>
                                                <td><asp:TextBox ID="txt_title" runat="server" style="width:300px;>"></asp:TextBox></td>
                                            </tr>
                                            <tr>
                                                <td align="right" style="width:80px;">是否显示：</td>
                                                <td><asp:DropDownList ID="Drop_IsVisible" runat="server">
                                                <asp:ListItem Value="1" Text="是"></asp:ListItem>
                                                <asp:ListItem Value="0" Text="否"></asp:ListItem>
                                                </asp:DropDownList></td>
                                            </tr>
                                            <tr>
                                                <td align="right" style="width:80px;">上传图片：</td>
                                                <td>
                                                    <asp:FileUpload ID="file_ImgPath" runat="server" />&nbsp;&nbsp;&nbsp;&nbsp;
                                                    <asp:Button ID="Btn_ViewImg" runat="server"  Text="上传" OnClick="Btn_ViewImg_Click"/>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="right" valign="top">图片预览：</td>
                                                <td>
                                                    <img id="imgView" runat="server" src="" width="500" height="140" />
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            </table>

                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                    <td width="50%" height="30" align="right">
                                        <asp:Button ID="btn_Save" OnClientClick="return SaveImgV()" runat="server" Text="确定" onclick="btn_Save_Click" />
                                    </td>
                                    <td width="6%" height="30" align="right">
                                        &nbsp;
                                    </td>
                                    <td width="44%" height="30">
                                        <asp:Button ID="Button1" runat="server" Text="返回列表" onclick="Button1_Click" />
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </td>
            <td background="../../images/mail_rightbg.gif">
                &nbsp;
            </td>
        </tr>
        <tr>
            <td valign="middle" background="../../images/mail_leftbg.gif">
                <img src="../../images/buttom_left2.gif" width="17" height="17" />
            </td>
            <td height="17" valign="top" background="../../images/buttom_bgs.gif">
                <img src="../../images/buttom_bgs.gif" width="17" height="17" />
            </td>
            <td background="../../images/mail_rightbg.gif">
                <img src="../../images/buttom_right2.gif" width="16" height="17" />
            </td>
        </tr>
    </table>
    </form>
</body>
</html>